Skip to content

Audit .rst & .py files and convert all Web3 instance variables to use… #1970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

wiseaidev
Copy link
Contributor

… w3 name.

Signed-off-by: Harmouch101 [email protected]

What was wrong?

Related to Issue #1183

How was it fixed?

By scanning through all .py & .rst files and change web3 to w3 using the following script that i built:

import os
for subdir, dirs, files in os.walk('.'):
    for filename in files:
        file = subdir + os.sep + filename
        if file.endswith(".py") or file.endswith(".rst") :
            replaced_content = ""
            print(f"[*] Working on file {file}.")
            with open(file, 'r', encoding='utf-8') as f:
                for line in f:
                    line = line.rstrip()
                    new_line = line.replace("web3 =", "w3 =")
                    replaced_content = replaced_content + new_line + "\n"
            with open(file, 'w', encoding='utf-8') as f:
                f.write(replaced_content)

Todo:

Cute Animal Picture

Cute little animal

@wiseaidev wiseaidev closed this Apr 30, 2021
@wiseaidev wiseaidev deleted the mv-Web3-w3 branch April 30, 2021 20:23
@wiseaidev
Copy link
Contributor Author

Hey @pipermerriam, I think this branch is a good starting point cause it triggers all the files(without any false positive) that contain an instance of the Web3 object. I think the best strategy here is to restore and reopen(forgot why I deleted it in the first place.) this PR and work on it manually like checking 2-5 files each day in my spare time. Therefore, I am reopening it(i hope there is no conflict). @fselmo, @kclowes, lemme know whenever you encounter any false positives here.

@wiseaidev wiseaidev restored the mv-Web3-w3 branch February 21, 2022 20:04
@wiseaidev wiseaidev reopened this Feb 21, 2022
@wiseaidev
Copy link
Contributor Author

I like how these changes just nuked everything. 😆

@wiseaidev wiseaidev closed this Feb 21, 2022
@wiseaidev wiseaidev deleted the mv-Web3-w3 branch February 21, 2022 20:13
@wiseaidev
Copy link
Contributor Author

Update on the situation @PR/2357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant